package com.wechat.wechat.utils;

import java.util.Random;

/**
 * @author NN
 * @2020/2/20 15:55
 */
public class KeyUtil {
    /**
     * 生成唯一主键，时间+随机数
     */
    public static synchronized String getUniqueKey()
    {
        Random random=new Random();
        Integer number = random.nextInt(900000)+100000;
        return System.currentTimeMillis()+String.valueOf(number);
    }
}
